import Mock from 'mockjs';
// 获取 mock.Random 对象
//const Random = Mock.Random; mock时间测试
//Random.date() + ' ' + Random.time()
let leaguesJson = require('../static/js/json/leagues.json'); //定义json文件中的数据为常量 方便一面使用
let scrollsJson = require('../static/js/json/scrolls.json');
let usersJson = require('../static/js/json/users.json');
let menuData = require('../static/js/json/menu.json');
//let scheduleData = require('../static/js/json/schedule.json');



Mock.setup({
  timeout: '200 - 400'
});
Mock.mock('/league', 'post', leaguesJson);//模拟ajax请求从文件（上面定义的常量）获得数据 方式（post get  delete update）
Mock.mock('/scrolls', 'post', scrollsJson);
Mock.mock('/users', 'post', usersJson);
Mock.mock('/menuData', 'post', menuData);
//Mock.mock('/scheduleData', 'post', scheduleData);
